const router = require('koa-router')()
const { handleMenu,handleHistory,handleAddOrdering,handleCancelOrdering,handleUserOrdering,handleCloseOrdering} = require('../controller/ordering.js')

router.prefix('/ordering')

//今日菜品
router.get('/', handleMenu)

//所有历史菜品
router.get('/history', handleHistory)

//添加订单
router.get('/add_ordering',handleAddOrdering)

//取消订单 或 订单-1
router.get('/cancel_ordering',handleCancelOrdering)

//获取用户订单菜品列表
router.get('/user_ordering',handleUserOrdering)

//结算
router.get('/close_ordering',handleCloseOrdering)

module.exports = router
